-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: Enable React Fast Refresh for block development #2519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gziolo It would be nice to add a PHPUnit test for wp_register_development_scripts
.
I'd be happy to assist with that.
Also, please see my notes below.
Thank you.
9cc28c4
to
b1f7065
Compare
Tested and works as expected (tested in firefox and chrome with wp-scripts). 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't reviewed JavaScript changes, but the PHP part of the PR looks good to me.
Committed with https://core.trac.wordpress.org/changeset/53140. |
Trac ticket: https://core.trac.wordpress.org/ticket/51750
Depends on #2263.
Brings the same functionality introduced in the Gutenberg plugin with WordPress/gutenberg#28273. In effect, it brings React Fast Refresh support to WordPress core for block development with
@wordpress/scripts
.The way I test it:
Ensure your WordPress develop instance has
SCRIPT_DEBUG
set totrue
. It should be the default when usingnpm run env:start
. You also need to activate the plugin with the Gurenpride block.Screenshots
React.Refresh.Safari.mov
React.Refresh.Chrome.and.Safari.mov
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.